//
//  BaseTableViewCell.m
//  AAIM
//
//  Created by 远的小布丁 on 2019/11/27.
//  Copyright © 2019 AAIM. All rights reserved.
//

#import "BaseTableViewCell.h"

@implementation BaseTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = UITableViewCellStyleDefault;
    [self.contentView addSubview:self.line];
    
    [_line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.mas_left).offset(SCALAE_WIDTH(15));
        make.bottom.equalTo(self.mas_bottom);
        make.height.offset(0.5);
        make.right.equalTo(self.mas_right).offset(SCALAE_WIDTH(-15));
    }];
    [self setShowUI];
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.selectionStyle = UITableViewCellStyleDefault;
        [self.contentView addSubview:self.line];
        
        [_line mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.mas_left).offset(SCALAE_WIDTH(15));
            make.bottom.equalTo(self.mas_bottom);
            make.height.offset(0.5);
            make.right.equalTo(self.mas_right).offset(SCALAE_WIDTH(-15));
        }];
        [self setShowUI];
    }
    return self;
}

- (void)setShowUI{
    
}

- (UIView *)line{
    if (!_line) {
        _line = [[UIView alloc]init];
        _line.backgroundColor = KHEXCOLOR(@"e0e0e0");
    }
    return _line;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
